package com.leyou.auth.interceptors;

import com.leyou.auth.constants.JwtConstants;
import com.leyou.auth.utils.UserContext;
import feign.RequestInterceptor;
import feign.RequestTemplate;

/**
 * @author 虎哥
 */
public class FeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate template) {
        template.header("Cookie", JwtConstants.COOKIE_NAME+ "=" + UserContext.getJwt());
    }
}
